package com.banzhi.shop.model.Impl;

import com.banzhi.shop.MyApp;
import com.banzhi.shop.entity.ChoiceAddress.Address;
import com.banzhi.shop.model.CallBack.GetAddressCallBack;
import com.banzhi.shop.model.IGetAddressModel;
import com.banzhi.shop.utils.AndroidUtil;
import com.google.gson.Gson;

/**
 * Created by Administrator on 2018/7/9.
 */

public class GetAddressImpl implements IGetAddressModel {
    @Override
    public void getAddress(GetAddressCallBack callBack) {
        String result = AndroidUtil.getJson("area.json", MyApp.context);
        Gson gson = new Gson();
        Address address = gson.fromJson(result, Address.class);
        callBack.getAddress(address);
    }
}
